/**
 * 
 */
package com.nari.heatassist.dao;

import java.util.List;

import com.nari.baseinfo.model.IHeatMeter;
import com.nari.coreframe.dao.hibernate3.IGenericDao;
import com.nari.heatassist.model.IBuildingConsumeConfig;
import com.nari.heatassist.utils.BuildingConsumeConfigEntity;
import com.nari.platform.model.PageCond;
import com.nari.platform.model.ResponseMsg;
import com.nari.platform.model.ResultWithPageCond;

/**
 * 
 * @author Xiaopeng
 * @date 2014-4-22
 */
public interface IBuildingConsumeConfigDao extends IGenericDao<IBuildingConsumeConfig, String> {

	/**
	 * 分页查询楼栋耗热配置项
	 * @param projectUID
	 * @param communityUID
	 * @param buildingUID
	 * @param pageCond
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-4-23
	 */
	public ResultWithPageCond<BuildingConsumeConfigEntity> queryConsumeConfigPage(String projectUID, 
			String communityUID, String buildingUID, PageCond pageCond) throws Exception;
	
	/**
	 * 分页查询参与楼栋热计量的配置列表
	 * @param buildingUID
	 * @param meterNo
	 * @param pageCond
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-4-23
	 */
	public ResultWithPageCond<IBuildingConsumeConfig> queryMeasureMeterPage(String buildingUID, String meterNo, 
			PageCond pageCond) throws Exception;
	
	/**
	 * 通过楼栋信息删除楼栋耗热计量配置项
	 * @param buildingUID
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-4-23
	 */
	public ResponseMsg deleteBuildingConsumeConfig(String buildingUID) throws Exception;
	
	/**
	 * 查询可用于楼栋耗热配置的热表列表，剔掉已参与该楼栋配置的热量表
	 * 根据楼栋与热表的物理关系(主干、分支等关系)，只要热表与楼栋在同一小区，即可进行逻辑关系配置
	 * @param projectUID
	 * @param communityUID
	 * @param meterNo
	 * @param buildingUID
	 * @param pageCond
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-4-24
	 */
	public ResultWithPageCond<IHeatMeter> queryConfigMeasureMeterPage(String projectUID, 
			String communityUID, String meterNo, String buildingUID, 
			PageCond pageCond) throws Exception;
	
	/**
	 * 通过楼栋与热量表的关联关系查询配置项
	 * @param buildingUID
	 * @param meterNo
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-4-24
	 */
	public IBuildingConsumeConfig queryConfigByRelation(String buildingUID, 
			String meterNo) throws Exception;
	/**
	 * 通过楼栋与热量表的关联关系删除配置项
	 * @param buildingUID
	 * @param meterNo
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-4-24
	 */
	public ResponseMsg deleteConfigByRelation(String buildingUID, 
			String meterNo) throws Exception;
	
	/**
	 * 统计楼栋配置的计量热表个数
	 * @param buildingUID
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-4-28
	 */
	public int countBuildingMeasureMeterNum(String buildingUID) throws Exception;
	
	/**
	 * 根据楼栋信息查询对应的计量热表
	 * @param buildingUID
	 * @param calculateType 热表计算关系
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-4-28
	 */
	public List<IHeatMeter> queryMeasureMetersByBuildingUID(String buildingUID, 
			String calculateType) throws Exception;
}
